import {View, Text, TouchableOpacity, ScrollView} from 'react-native';
import React from 'react';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import HomeScreen from '../screens/home';
// 栈路由 类似于网页的history路由
const Stack = createNativeStackNavigator();
export default function HomeStack() {
  return (
    <Stack.Navigator>
      <Stack.Screen
        name="HomeCom"
        component={HomeScreen}
        options={{
          title: '首页',
          headerStyle: {
            backgroundColor: '#00b38a',
          },
          headerShadowVisible: false, // 设置header阴影
          headerTintColor: '#fff',
          headerRight: () => {
            return (
              <TouchableOpacity onPress={() => alert('Hello')}>
                <Text style={{fontSize: 18, color: '#fff', marginRight: 10}}>
                  拍照
                </Text>
              </TouchableOpacity>
            );
          },
        }}
      />
    </Stack.Navigator>
  );
}
